#ifndef USART_H
#define USART_H

#include "lib/inc/stm32f10x_conf.h"

enum {
    USART_1,
    USART_2,
    USART_3,
    USART_4,
    USART_5,
};

enum {
    U_ERR_SUCCSE,
    U_ERR_REMAP,
    U_ERR_PARAM,
    U_ERR_NONE,
};

void UsartInit(uint8_t usart, uint32_t baudrate, uint8_t remap);
void UsartNvicInit(uint8_t usart, uint8_t PreemptionPriority, uint8_t SubPriority);
void UsartPutC(uint8_t usart, unsigned char c);
void UsartPuts(uint8_t usart, unsigned char *str,int num);
uint8_t UsartGetC(uint8_t usart, uint8_t *out);

#endif
